package com.lhy.exception;

import com.lhy.vo.Result;
import org.apache.shiro.authz.UnauthorizedException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @Author：罗昊宇
 * @Package：com.lhy.exception
 * @Project：shiro-framwork
 * @name：MyGlobException
 * @Date：2024/5/10 0010  19:35
 * @Filename：MyGlobException
 */
@RestControllerAdvice
public class MyGlobException {

    @ExceptionHandler(value = UnauthorizedException.class)
    public Result exception1(UnauthorizedException e){

        return new Result(401,"权限不足，请联系工作人员",null);
    }

}


